package com.yc.cloud.common.message.sms.enums;

import com.yc.cloud.common.basic.enums.IEnumCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @title: 移动端登录类型枚举类
 * @Author JackGu
 * @Date: 2022/10/2 18:55
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum SmsTypeEnums implements IEnumCode {
    /***
     * description:
     */
    REGISTER("register", "注册"),

    FORGET_PASSWORD("forgetpwd", "忘记密码"),

    LOGIN("login", "登录");


    /**
     * 状态码
     */
    final String code;
    /**
     * 消息内容
     */
    final String description;

    public static boolean isValidEnum(String code) {
        for (SmsTypeEnums fundStatusEnum : SmsTypeEnums.values()) {
            if (fundStatusEnum.code.equals(code)) {
                return true;
            }
        }
        return false;
    }
};
